<?php
/**
 * Fastapp.
 * 3/27/24
 * @Author deepsea
 * @Contact telegram:deepsea159
 */

namespace App\Fastapp\Api\Controller\Account;

use App\Fastapp\Api\Controller\ApiController;
use App\Fastapp\Api\Service\Account\AgentService;
use App\Fastapp\Aspect\ApiAuth;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller('api/agent'), ApiAuth]
class AgentController extends ApiController
{
    #[Inject]
    public AgentService $service;

    #[GetMapping('team')]
    public function team(): ResponseInterface
    {
        return $this->success($this->service->team());
    }

    #[GetMapping('income')]
    public function income(): ResponseInterface
    {
        return $this->success($this->service->income());
    }

    #[GetMapping('newUserCount')]
    public function newUserCount(): ResponseInterface
    {
        return $this->success($this->service->newUserCount());
    }

    #[GetMapping('rechargeCount')]
    public function rechargeCount(): ResponseInterface
    {
        return $this->success($this->service->rechargeCount());
    }
}